package net.roobook.cms.modules.demo.service;

import net.roobook.cms.modules.demo.entity.DemoEntity;
import org.springframework.transaction.TransactionException;

import java.util.List;

/**
 * @author Roobook
 * @email 327878610@qq.com
 * @link https://roobook.net
 * @Description Demo测试Service
 * @date 2023/9/7 17:10
 **/
public interface DemoService {
    /**
     * 增
     * @param demo
     * @return
     * @throws TransactionException
     */
    int add(DemoEntity demo) throws TransactionException;

    /**
     * 删
     * @param demo
     * @return
     * @throws TransactionException
     */
    int delete(DemoEntity demo) throws TransactionException;

    /**
     * 改
     * @param demo
     * @return
     * @throws TransactionException
     */
    int update(DemoEntity demo) throws TransactionException;

    /**
     * 查
     * @param demo
     * @return
     */
    List<DemoEntity> queryDemoEntity(DemoEntity demo);
    DemoEntity queryDemoById(Integer id);
}
